package cz.semjob.learning.data;

import java.util.List;

import cz.semjob.learning.instances.LabeledTextInstance;
import cz.semjob.learning.instances.creator.ITextInstanceCreator;

public class DataSetCollector {
	
	private ITextInstanceCreator textInstanceCreator;
	
	private DataSet dataSet;
	
	public DataSetCollector(String name, ITextInstanceCreator textInstanceCreator) {
		this.textInstanceCreator = textInstanceCreator;
		dataSet = new DataSet(name);
		dataSet.setAttributesList(textInstanceCreator.getListOfAttributes());
	}
	
	public void addPositiveInstances(List<LabeledTextInstance> instances) {
		dataSet.addPositiveInstances(instances);
	}
	
	public void addNegativeInstances(List<LabeledTextInstance> instances) {
		dataSet.addNegativeInstances(instances);
	}
	
	public DataSet getDataSet() {
		return dataSet;
	}

	public ITextInstanceCreator getTextInstanceCreator() {
		return textInstanceCreator;
	}

	public void setTextInstanceCreator(ITextInstanceCreator textInstanceCreator) {
		this.textInstanceCreator = textInstanceCreator;
	}
	
	public int getPositiveInstancesSize() {
		return dataSet.getPositiveInstancesSize();
	}
	
	public int getNegativeInstancesSize() {
		return dataSet.getNegativeInstancesSize();
	}

	
	
	

	
	
	
	

}
